import api from "@/util/api";

const categoryApi = {
  findAll() {
    return api.get("/plantClassification/tree").then((resp) => resp.data);
  },
  removeAll(ids) {
    return api.delete("/plantClassification", { data: ids }).then((resp) => resp.data);
  },
  save(plantClassification) {
    return api.post("/plantClassification", plantClassification).then((resp) => resp.data);
  },
  update(plantClassification) {
    return api.put("/plantClassification", plantClassification).then((resp) => resp.data);
  },
  updataByState(plantClassification) {
    return api.put("/plantClassification/state", plantClassification).then((resp) => resp.data);
  },
};

export default categoryApi;
